export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  // 该配置项用于配置应用默认的 meta 标签。
  head: {
    title: 'interaction-app',
    htmlAttrs: {
      lang: 'zh'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  // 全局样式定义
  css: [
    'element-ui/lib/theme-chalk/index.css',
    '~/assets/css/global.css',
    'element-ui/lib/theme-chalk/display.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  // 该配置项用于配置那些需要在 根vue.js应用 实例化之前需要运行的 Javascript 插件。
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/axios'
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  // 自动导入模块
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  // 该配置项允许您将 Nuxt 模块添加到项目中。
  modules: [
    '@nuxtjs/axios',
    'nuxt-highlightjs',
    ['nuxt-highlightjs', {
      style: 'obsidian'
    }]
  ],
  axios: {
    baseURL: 'http://localhost:18082',
  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  // 引入第三方模块
  build: {
    transpile: [/^element-ui/],
    babel: {
      plugins: [
        [
          'prismjs',
          {
            languages: [
                'html',
                'css',
                'javascript',
                'php',
                'dart',
                'bash',
                'nginx',
                'sql',
                'c',
                'cpp',
                'python',
                'go',
                'java'
            ],
            plugins: [
                'line-numbers',
                'show-language',
                'copy-to-clipboard'
            ],
            language:'zh_CN',
            theme: 'coy',
            css: true
          }
        ]
      ]
    }
  }
}
